﻿/*
Copyright (C) 2009  Tomasz Chrzanowski

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>
*/


namespace Com.TomCdc.ChangeDataCapture
{
    /// <summary>
    /// Represents a generic collection of objects that can be iterated forward and backward.
    /// </summary>
    /// <typeparam name="T">The type of objects to iterate.</typeparam>
    interface ISelector<T>
    {
        /// <summary>
        /// Gets next element from the collection.
        /// </summary>
        /// <returns>The next element.</returns>
        T GetNext();

        /// <summary>
        /// Gets current element from the collection.
        /// </summary>
        /// <returns>The current element.</returns>
        T GetCurrent();

        /// <summary>
        /// Gets previous element from the collection.
        /// </summary>
        /// <returns>The previous element.</returns>
        T GetPrevious();

        /// <summary>
        /// Gets value indicating whether exists next element in the collection.
        /// </summary>
        /// <returns>True if next element exists.</returns>
        bool IsNext();

        /// <summary>
        /// Gets value indicationg whether exists next wlement in the collection.
        /// </summary>
        /// <returns></returns>
        bool IsPrevious();

        /// <summary>
        /// Returns the number of element in the collection.
        /// </summary>
        int Count { get; }

    }
}
